﻿@{
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_Form.cshtml";
    ZFine.Domain.Entity.InformMessagesEntity thisobj = ViewData["objs"] as ZFine.Domain.Entity.InformMessagesEntity;
    if (thisobj == null)
    {
        thisobj = new ZFine.Domain.Entity.InformMessagesEntity();
    }
}
<script>
    var keyValue = $.request("keyValue");
    $(function () {
        debugger;
        if (!!keyValue) {
            $.ajax({
                url: "/Project/InformMessages/GetFormJson",
                data: { keyValue: keyValue },
                dataType: "json",
                async: false,
                success: function (data) {
                    $("#form1").formSerialize(data);
                }
            });
        } else {
            $("#form1").formSerialize("add");
        }
    });

    function submitForm() {
        var postData = $("#form1").formSerialize();
        if (!$('#form1').formValid()) {
            return false;
        }
        debugger;
        $.submitForm({
            url: "/Project/InformMessages/SubmitFormC",
            param: postData,
            success: function () {
                $.currentWindow().$("#gridList").trigger("reloadGrid");
            }
        });
    };

</script>
<form id="form1">
    <div style="margin-top: 10px; margin-left: 10px; margin-right: 10px;">
        <ul class="nav nav-tabs">
            <li class="active"><a href="#">基本信息</a></li>
            @*<li ><a href="#">扩展信息</a></li>*@
        </ul>
        <div style="padding-top: 20px; margin-right: 30px;">
            <table class="form">
                <tr>
                    <th class="formTitle">发送标题</th>
                    <td class="formValue">
                        @*@thisobj.Title*@
                        <input id="Title" name="Title" type="text" class="form-control" />
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">相关内容</th>
                    <td class="formValue" colspan="3">
                        <textarea id="Remark" name="Remark" class="form-control" style="height: 60px;" placeholder="请输入相关内容"></textarea>
                    </td>
                </tr>
                @*<tr>
                        <th class="formTitle">发送时间</th>
                        <td class="formValue">
                            <input id="SendTime" name="SendTime" type="text" class="form-control input-wdatepicker" onfocus="WdatePicker()" style="margin-left: 2px" placeholder="请输入发送时间" />
                        </td>
                    </tr>*@

            </table>
        </div>
    </div>
</form>
